package com.ruoyi.imports.service.impl;

import java.util.List;
import com.ruoyi.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.imports.mapper.TdRawWaterMapper;
import com.ruoyi.imports.domain.TdRawWater;
import com.ruoyi.imports.service.ITdRawWaterService;

/**
 * 原料水检测Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-07-14
 */
@Service
public class TdRawWaterServiceImpl implements ITdRawWaterService 
{
    @Autowired
    private TdRawWaterMapper tdRawWaterMapper;

    /**
     * 查询原料水检测
     * 
     * @param id 原料水检测主键
     * @return 原料水检测
     */
    @Override
    public TdRawWater selectTdRawWaterById(Long id)
    {
        return tdRawWaterMapper.selectTdRawWaterById(id);
    }

    /**
     * 查询原料水检测列表
     * 
     * @param tdRawWater 原料水检测
     * @return 原料水检测
     */
    @Override
    public List<TdRawWater> selectTdRawWaterList(TdRawWater tdRawWater)
    {
        return tdRawWaterMapper.selectTdRawWaterList(tdRawWater);
    }

    /**
     * 新增原料水检测
     * 
     * @param tdRawWater 原料水检测
     * @return 结果
     */
    @Override
    public int insertTdRawWater(TdRawWater tdRawWater)
    {
        tdRawWater.setCreateTime(DateUtils.getNowDate());
        return tdRawWaterMapper.insertTdRawWater(tdRawWater);
    }

    /**
     * 修改原料水检测
     * 
     * @param tdRawWater 原料水检测
     * @return 结果
     */
    @Override
    public int updateTdRawWater(TdRawWater tdRawWater)
    {
        tdRawWater.setUpdateTime(DateUtils.getNowDate());
        return tdRawWaterMapper.updateTdRawWater(tdRawWater);
    }

    /**
     * 批量删除原料水检测
     * 
     * @param ids 需要删除的原料水检测主键
     * @return 结果
     */
    @Override
    public int deleteTdRawWaterByIds(Long[] ids)
    {
        return tdRawWaterMapper.deleteTdRawWaterByIds(ids);
    }

    /**
     * 删除原料水检测信息
     * 
     * @param id 原料水检测主键
     * @return 结果
     */
    @Override
    public int deleteTdRawWaterById(Long id)
    {
        return tdRawWaterMapper.deleteTdRawWaterById(id);
    }
}
